<template>
	<view class="">
		<view class="topbox">
			<u-navbar title-color="#ffffff" title="我的团队" :border-bottom="false" :background="background"></u-navbar>
			<view class="infobox">
				<view class="tops">
					<image src="../../static/小葵.jpg" mode=""></image>
					<view class="rightbox">
						<view class="">
							<text>吃货三十</text>
							<text class="hhr">合伙人</text>
						</view>
						<view class="time">
							时间：2021-09-09
						</view>
					</view>
				</view>
				<view class="shuju">
					<view class="">
						<view class="price">
							500.00元
						</view>
						<view class="sy">
							累计收益
						</view>
					</view>
					<view class="">
						<view class="price">
							0
						</view>
						<view class="sy">
							累计订单
						</view>
					</view>
					<view class="">
						<view class="price">
							0
						</view>
						<view class="sy">
							新增下级
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="navbox">
			<view :class="current==index?'selecttab': 'tab'" v-for="(item,index) in navlist" :key="index"
				@click="navbtn(index)">
				{{item}}
			</view>
		</view>
		<u-tabs :list="list" font-size="26" active-color="#ff0000" :is-scroll="false" :current="currents"
			@change="change" v-if="current==3"></u-tabs>
		<view class="info" v-if="current==3">
			<image src="../../static/小葵.jpg" mode=""></image>
			<view class="rightbox">
				<view class="first">
					<text class="yh">用户1598</text>
					<text class="pthy">普通会员</text>
					<text class="jjsx">即将失效</text>
					<image src="../../static/问号.png" mode=""></image>
				</view>
				<view class="center">
					累计收益：800元 今日收益：200元
				</view>
				<view class="time">
					时间：2018-09-05 11255 <image src="../../static/电话.png" mode=""></image>
				</view>
			</view>
		</view>
		<view class="" v-if="current!=3">
			<view class="cj">
				<view class="times">
					今日
				</view>
				<view class="list">
					<view class="smallbox">
						<view class="title">
							累计收益
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							累计订单
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							新增下级
						</view>
						<view class="num">
							2
						</view>
					</view>
				</view>
			</view>
			<view class="cj">
				<view class="times">
					昨日
				</view>
				<view class="list">
					<view class="smallbox">
						<view class="title">
							累计收益
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							累计订单
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							新增下级
						</view>
						<view class="num">
							2
						</view>
					</view>
				</view>
			</view>
			<view class="cj">
				<view class="times">
					本周
				</view>
				<view class="list">
					<view class="smallbox">
						<view class="title">
							累计收益
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							累计订单
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							新增下级
						</view>
						<view class="num">
							2
						</view>
					</view>
				</view>
			</view>
			<view class="cj">
				<view class="times">
					本月
				</view>
				<view class="list">
					<view class="smallbox">
						<view class="title">
							累计收益
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							累计订单
						</view>
						<view class="num">
							2
						</view>
					</view>
					<view class="smallbox">
						<view class="title">
							新增下级
						</view>
						<view class="num">
							2
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				background: {
					// 导航栏背景图
					// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
				},
				navlist: ["收益报表", "评级奖", "极差奖", "我的团队"],
				current: 0,
				list: [{
					name: "我的上级"
				}, {
					name: "直推好友"
				}, {
					name: "次级好友"
				}, {
					name: "即将失效"
				}],
				currents: 0
			}
		},
		methods: {

			navbtn(v) {
				this.current = v
			},
			change(v) {
				this.currents = v
				// console.log(e)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.topbox {
		width: 100%;
		height: 522rpx;
		background: url("../../static/bj.png") no-repeat fixed top;
		background-size: 100% 520rpx;

		.infobox {
			width: 690rpx;
			height: 338rpx;
			background-color: #ffffff;
			box-shadow: 0rpx 2rpx 20rpx 0rpx rgba(142, 135, 135, 0.1);
			border-radius: 15rpx;
			margin-left: 30rpx;
			padding: 25rpx;
			box-sizing: border-box;
			margin-top: 50rpx;

			.tops {
				display: flex;
				align-items: center;

				image {
					width: 121rpx;
					height: 121rpx;
					border-radius: 121rpx;
				}

				.rightbox {
					margin-left: 33rpx;

					text {
						font-family: MicrosoftYaHei;
						font-size: 36rpx;
						color: #000000;
						opacity: 0.9;
						font-weight: 700;
					}

					.hhr {
						width: 94rpx;
						height: 34rpx;
						background-color: #f05627;
						border-radius: 17rpx;
						line-height: 34rpx;
						text-align: center;
						color: #fff;
						font-family: MicrosoftYaHei;
						font-size: 24rpx;
						margin-left: 20rpx;
						display: inline-block;
						font-weight: 400;
					}

					.time {
						font-family: MicrosoftYaHei;
						font-size: 28rpx;
						color: #444444;
						opacity: 0.9;
						margin-top: 15rpx;
					}
				}

			}
		}

		.shuju {
			display: flex;
			justify-content: space-around;
			text-align: center;
			margin-top: 53rpx;

			.price {
				font-family: SourceHanSansCN-Bold;
				font-size: 30rpx;
				color: #222222;
				font-weight: 700;
			}

			.sy {
				font-family: SourceHanSansCN-Regular;
				font-size: 24rpx;
				color: #666666;
				margin-top: 23rpx;
			}
		}
	}

	.navbox {
		width: 100%;
		height: 84rpx;
		border-top: 1rpx solid #d3d3d3;
		border-bottom: 1rpx solid #d3d3d3;
		line-height: 84rpx;
		display: flex;
		align-items: center;

		.tab {
			width: 25%;
			border-right: 1rpx solid #d3d3d3;
			text-align: center;
			font-family: MicrosoftYaHei;
			font-size: 28rpx;
			color: #222222;
			font-weight: 700;
		}

		.tab:nth-child(4) {
			border-right: none;
		}

		.selecttab {
			color: #ff0000;
			width: 25%;
			border-right: 1rpx solid #d3d3d3;
			text-align: center;
			font-family: MicrosoftYaHei;
			font-size: 28rpx;
			font-weight: 700;
		}

		.selecttab:nth-child(4) {
			border-right: none;
		}
	}

	.cj {
		width: 690rpx;
		height: 188rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
		margin-left: 30rpx;
		padding: 20rpx 12rpx;
		box-sizing: border-box;
		margin-top: 36rpx;

		.times {
			font-family: MicrosoftYaHei;
			font-size: 30rpx;
			color: #f05627;
		}

		.list {
			display: flex;
			align-items: center;
			justify-content: space-around;
			text-align: center;

			.smallbox {
				margin-top: 10rpx;

				.title {
					font-family: MicrosoftYaHei;
					font-size: 26rpx;
					color: #444444;
				}

				.num {
					font-family: MicrosoftYaHei;
					font-size: 28rpx;
					color: #222222;
					margin-top: 20rpx;
				}
			}
		}
	}

	.teamnav {
		display: flex;
		align-items: center;
		justify-content: space-around;
	}

	.info {
		width: 690rpx;
		height: 156rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
		margin-top: 20rpx;
		margin-left: 30rpx;
		display: flex;
		padding: 20rpx;
		box-sizing: border-box;

		image {
			width: 58rpx;
			height: 58rpx;
			border-radius: 58rpx;
		}

		.rightbox {
			margin-left: 20rpx;

			.first {
				display: flex;
				align-items: center;

				.yh {
					font-family: SourceHanSansCN-Regular;
					font-size: 26rpx;
					color: #444444;
				}

				.pthy {
					display: inline-block;
					height: 28rpx;
					background-color: #f05627;
					border-radius: 14rpx;
					padding: 0 10rpx;
					line-height: 28rpx;
					text-align: center;
					color: #FFFFFF;
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					margin-left: 10rpx;
				}

				.jjsx {
					font-family: MicrosoftYaHei;
					font-size: 24rpx;
					color: #ff0000;
					margin-left: 10rpx;
				}

				image {
					width: 23rpx;
					height: 23rpx;
					border-radius: 0;
					margin-left: 5rpx;
				}
			}

			.center {
				font-family: SourceHanSansCN-Regular;
				font-size: 26rpx;
				font-weight: normal;
				letter-spacing: 0rpx;
				color: #9f9f9f;
			}

			.time {
				display: flex;
				align-items: center;
				font-family: SourceHanSansCN-Regular;
				font-size: 26rpx;
				font-weight: normal;
				letter-spacing: 0rpx;
				color: #9f9f9f;

				image {
					width: 26rpx;
					height: 26rpx;
					border-radius: 0;
					margin-left: 5rpx;
				}
			}
		}
	}
</style>
